package com.enjoyor.soa.traffic.util.bean.base;

import java.io.Serializable;

public class BaseResult implements Serializable {

    private static final long serialVersionUID = 4704037945209186496L;

    private Status status;
    private Object response;

    public BaseResult() {
    }

    public BaseResult(Status status, Object response) {
        this.status = status;
        this.response = response;
    }

    public static enum Status {
        OK, ERROR;

        private Status() {
        }
    }

    public void addOK(Object response) {
        this.response = response;
        this.status = Status.OK;
    }

    public void addError(Object response) {
        this.response = response;
        this.status = Status.ERROR;
    }

    public Status getStatus() {
        return this.status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public Object getResponse() {
        return this.response;
    }

    public void setResponse(Object response) {
        this.response = response;
    }

}
